﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Web.Management;


namespace dao.daos
{
    public class BarrioDao : BaseDao
    {
        public BarrioDao() : base("barrios", "id_barrio", true)
        {

        }

        public SqlDataReader ObtenerBarrios(string nombre)
        {
            Conectar();
            SqlDataReader dr = null;
            try
            {
                Cmd.CommandText = "SELECT * FROM barrios";
                dr = Cmd.ExecuteReader(CommandBehavior.CloseConnection);
                return dr;
            }
            catch (Exception e)
            {
                throw new SqlExecutionException("Error al obtener club por razón social", e);
            }
        }
    }
}
